<template>
    <div class="form-cont">
        <div class="floor">
            <span class="span-left">分组名称：</span><el-input v-model="input" placeholder="请输入内容"></el-input>
        </div>
        <div class="area-floor floor">
            <span class="span-left">分组名称：</span>
            <el-input
                type="textarea"
                :rows="2"
                placeholder="请输入内容"
                v-model="textarea"
            >
            </el-input>
        </div>
        <div class="radio-floor floor">
            <span class="span-left">状态：</span>
            <div class="inline">
                <el-radio-group
                    v-model="radio"
                    @change='changeRadio'
                >
                    <el-radio  :label="1" border>启用</el-radio>
                    <el-radio  :label="0" border>停用</el-radio>
                </el-radio-group>
            </div>
        </div>
        <div class="bottom-cont">
            <el-button type="primary" @click="submitFun">保存</el-button>
        </div>
    </div>
</template>
<script>
/* eslint-disable */
import axios from 'axios'
export default {
  name: 'formPart',
  data () {
    return {
      input: '',
      textarea: '',
      radio: 1
    }
  },
  methods: {
      changeRadio (val){
          console.log(val)
      },
      submitFun () {
          let add='{"name":23423423424323}'
          axios.get(`/addGoodsGroup?strJson=${add}`)
      }
  }
}
</script>
<style lang='stylus' scoped>
    .form-cont{
        margin-left:80px;
        text-align :left;
        .floor{
            margin-bottom:20px;
            .el-input{
                width: 312px;
            }
            .span-left{
                width :86px;
                display :inline-block;
                text-align:right;
            }
        }
        .area-floor{
            span{
                height :54px;
                line-height :54px;
            }
            .el-textarea{
                width: 312px;
                textarea {
                    height: 127px;
                }
            }
        }
        .radio-floor{
            margin :20px 0;
        }
        .bottom-cont{
            button{
                margin-left :86px;
            }
        }
    }
</style>
